/**
 * @file       Point_test.cpp
 * @brief      TODO
 * @author     Huabo Zheng
 * @date       Jan 12, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#include "Point.h"
#include "gtest/gtest.h"
namespace NS_LCD_AFW
{
class CPoint_test: public testing::Test
{
public:
	virtual ~CPoint_test()
	{
	}
public:
	virtual void SetUp()
	{
	}
	virtual void TearDown()
	{
	}
};

TEST_F(CPoint_test,test_getX)
{
	CPoint pt(-1, 100);
	EXPECT_EQ(-1, pt.getX());

}
TEST_F(CPoint_test,test_getY)
{
	CPoint pt(0, 100);
	EXPECT_EQ(100, pt.getY());

}
TEST_F(CPoint_test,test_setX)
{
	CPoint pt;
	EXPECT_NE(100, pt.getX());
	pt.setX(100);
	EXPECT_EQ(100, pt.getX());

}
TEST_F(CPoint_test,test_setY)
{
	CPoint pt;
	EXPECT_NE(100, pt.getY());
	pt.setY(100);
	EXPECT_EQ(100, pt.getY());

}
TEST_F(CPoint_test,test_equal)
{
	CPoint pt1(0, 1);
	CPoint pt2(0, 1);
	EXPECT_EQ(pt1, pt2);
}
TEST_F(CPoint_test,test_notEqual)
{
	CPoint pt1(0, 0);
	CPoint pt2(0, 1);
	EXPECT_NE(pt1, pt2);

	pt1.setX(1);
	EXPECT_NE(pt1, pt2);

	pt1.setY(1);
	EXPECT_NE(pt1, pt2);

}
TEST_F(CPoint_test,test_add)
{
	CPoint pt1(1, 2);
	CPoint pt2(5, 9);
	EXPECT_EQ(CPoint(6,11), pt1+pt2);
}
} /* namespace NS_LCD_AFW */

